<template>
	<view class="">
		<u-sticky bgColor="#fff">
			<view class="flexbetween dingwei">
				<view class="flexcenter " :class="tab_type==item.value?'baisebj':'huangsebj'" v-for="item in toplist"
					:key="item.value" @click="tab_type=item.value;getlist();"
					style="width: 50%;padding: 15rpx;box-sizing: border-box;">{{item.name}}</view>
			</view>
		</u-sticky>
		<view class="mainpadding2">
			<view class="flexcenter" v-if="!list.length">
				<view class="placeholderimage" style="margin-top: 100rpx;"></view>
			</view>
			<view class="mainpadding_top shadow ffffff radius flexleft dingwei" v-for="item in list" :key="item.id" @click="jumpdetail('/pages/workbench/huodonghx?id=',item.orderinfo.id)">
				<view class="checkfocus xiaobai" v-show="item.is_tx==1">已領取</view>
				<view class="checkfocus xiaobai" style="background-color: #999;" v-show="item.is_tx==0">未領取</view>
				<view class="flexleft">
					<image src="/static/logo.png" mode="" class="radius" style="min-width: 100rpx;width: 100rpx;height: 100rpx;" v-if="item.is_staff==1"></image>
					<image :src="item.logoimage_text" class="radius" mode="" style="min-width: 100rpx;width: 100rpx;height: 100rpx;" v-if="item.is_staff==0"></image>
					<view class="margin_left2">
						<text v-show="item.is_staff==1" class="lanlable" style="font-size: 20rpx;">員工</text>
						<view class="xiaohei titletext ">{{item.name}}
						</view>
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tab_type:1,
				toplist:[{
					name: '全部',
					value: 1,
				}, {
					name: '已領取',
					value: 2,
				},{
					name: '未領取',
					value: 3,
				}],
				listid:"",
				ListAll:{},
				list:[]
			}
		},
		onLoad(options) {
			this.tab_type = options.tab_type
			this.listid = options.id
			this.init()
		},
		methods: {
			init(){
				this.http.request("/api/Shopwelfarecl/getIndex", 'POST', {
					id:this.listid
				}).then(res => {
					this.ListAll = res.data
					this.getlist()
				})
			},
			getlist(){
				if(this.tab_type==1) this.list = this.ListAll.all_data
				if(this.tab_type==2) this.list = this.ListAll.yl_data
				if(this.tab_type==3) this.list = this.ListAll.wl_data
			}
		}
	}
</script>

<style>

</style>
